package com.qf.dao.impl;

import com.qf.dao.UserDao;
import com.qf.utils.Task;

import java.util.ArrayList;
import java.util.List;

/**
 * IntelliJ IDEA -> quartz
 * 2019/11/29 19:09
 *
 * @author zmyao
 * 别看，我是渣渣。
 */
public class UserDaoImpl implements UserDao {
    @Override
    public List<Task> findTaskByName(String name) {
        ArrayList<Task> tasks = new ArrayList<>();
        if ("张三".equals(name)) {
            Task task = new Task("张三上课");
            tasks.add(task);
        }
        else if ("李四".equals(name)) {
            Task task = new Task("李四吃饭");
            tasks.add(task);
        }
        else  {
            Task task = new Task("在家睡觉");
            tasks.add(task);
        }
        return tasks;
    }
}
